function updateSuccess(updateResult) {
    if (updateResult == 'false') {
        updateResult = 'N\xfamero de horas excedido en la distribucion';
        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'flat'
        }
        

        Messenger().post({
            message: updateResult,
            type: 'error',
            showCloseButton: true
        });
    }
     
    else {

        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'flat'
        }

        Messenger().post({
            message: updateResult,
            type: 'success',
            showCloseButton: true
        });
    }
};
function error(errorMessage) {

    Messenger.options = {
        extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
        theme: 'flat'
    }

    Messenger().post({
        message: errorMessage,
        type: 'error',
        showCloseButton: true
    });
}
function updateSuccessResized(updateResult) {

    Messenger.options = {
        extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
        theme: 'flat'
    }

    Messenger().post({
        message: 'Fecha actualizada',
        type: 'success',
        showCloseButton: true
    });
}
function deleteSuccess(deleteResult) {
    Messenger.options = {
        extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
        theme: 'flat'
    }

    Messenger().post({
        message: deleteResult,
        type: 'info',
        showCloseButton: true
    });
}
function addSuccess(addResult) {
    if (addResult == 'false') {
        addResult = 'N\xfamero de horas excedido en la distribucion';
        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'flat'
        }

        Messenger().post({
            message: addResult,
            type: 'error',
            showCloseButton: true
        });
    }
    else if (addResult == 'false2') {
        addResult = 'No se puede ingresar m&aacutes de una vez una materia a un d&iacutea, en su defecto intente modificar :D';
        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'flat'
        }


        Messenger().post({
            message: addResult,
            type: 'error',
            showCloseButton: true
        });
    }
    else {
        Messenger.options = {
            extraClasses: 'messenger-fixed messenger-on-bottom messenger-on-right',
            theme: 'flat'
        }

        Messenger().post({
            message: addResult,
            type: 'success',
            showCloseButton: true
        });
    }
    window.location.reload();
}